<template>
    <div class="container">
        <!-- 导航栏区域开始 -->
        <TridentNavBar>
            <template #default>扫一扫案例</template>
        </TridentNavBar>
        <!-- 导航栏区域结束 -->

        <div class="scanner-wrap">
            <TridentScanner :qrbox="250" 
                :fps="10" 
                style="width: 200px;"
                @scanResult="onScan"
            />
        </div>
    </div>
</template>

<script lang="ts" setup>
const onScan = (decodedText: any, decodedResult: any) => {
    console.log('decodedText =', decodedText);
    console.log('decodedResult =', decodedResult);
    
}   
</script>

<style scoped lang="scss">
page,
.container {
    height: 100vh;
    .scanner-wrap {
        padding-top: 45px;
    }
}
</style>